import request from "../utils/request"

// 角色列表
export const getRoleList = params => {
    return request({
        method: 'POST',
        url: '/queryRoleByCondition',
        params: params
    })
}

// 新增角色
export const addRole = params => {
    return request({
        method: 'POST',
        url: '/addRole',
        data: params
    })
}

// 获取角色信息
export const getRoleInfo = params => {
    return request({
        method: 'GET',
        url: '/getRoleInfo',
        params: params
    })
}

// 给角色分配权限信息
export const setPermissionForRole = params => {
    return request({
        method: 'POST',
        url: '/setPermissionForRole',
        data: params
    })
}

// 查询角色下的所有权限信息
export const queryRoleOfPermission = params => {
    return request({
        method: 'GET',
        url: '/queryRoleOfPermission',
        params: params
    })
}

// 查询所有角色信息
export const queryAllRole = () => {
    return request({
        method: 'GET',
        url: '/queryAllRole'
    })
}

